package com.homwork.demo.controller;

import com.homwork.demo.entity.User;
import com.homwork.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lq
 * @date 2020/12/24 16:33
 */
@RestController(value = "user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/list")
    public List<User> getList(){
        return userService.getUserList();
    }
}
